using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_artindexerMap : EntityTypeConfiguration<so_artindexer>
    {
        public so_artindexerMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.REVIEW)
                .HasMaxLength(35);

            this.Property(t => t.TITLE)
                .HasMaxLength(35);

            this.Property(t => t.AUTHOR)
                .HasMaxLength(35);

            this.Property(t => t.SUBJECT)
                .HasMaxLength(35);

            this.Property(t => t.NOTE)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("so_artindexer");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.DATE).HasColumnName("DATE");
            this.Property(t => t.REVIEW).HasColumnName("REVIEW");
            this.Property(t => t.TITLE).HasColumnName("TITLE");
            this.Property(t => t.AUTHOR).HasColumnName("AUTHOR");
            this.Property(t => t.SUBJECT).HasColumnName("SUBJECT");
            this.Property(t => t.NOTE).HasColumnName("NOTE");
        }
    }
}
